const baseConfig = require('./server.base');
const path = require('path');
const CleanWebpackPlygin = require('clean-webpack-plugin');

const config = {
    ...baseConfig,

    plugins: [
        // 删除上次打包结果
        new CleanWebpackPlygin(['dist'], {
            root: path.resolve(__dirname, '../../'),
            verbose: true,
            dry: false
        }),

        ...baseConfig.plugins
    ],

    mode: 'production'
}

module.exports = config;